class_name PauseView
extends BaseView

#region 属性
@export var continue_btn:AnimatedButton
@export var setting_btn:AnimatedButton
@export var main_menu_btn:AnimatedButton
var connect_obj_dict:Dictionary[Signal,ConnectObj] = {}
#endregion
#region 字段
#endregion
#region 信号
#endregion

#region 基类方法
func init_view():
	super.init_view()
	connect_obj_dict[continue_btn.pressed] = ConnectObj.new(continue_btn.pressed,[_on_continue_btn_pressed])
	connect_obj_dict[setting_btn.pressed] = ConnectObj.new(setting_btn.pressed,[_on_setting_btn_pressed])
	connect_obj_dict[main_menu_btn.pressed] = ConnectObj.new(main_menu_btn.pressed,[_on_main_menu_btn_pressed])
func on_enter(args:Dictionary = {}):
	super.on_enter(args)
func on_pause(args:Dictionary = {}):
	super.on_pause(args)
func on_resume(args:Dictionary = {}):
	super.on_resume(args)
func on_exit(args:Dictionary = {}):
	for connect_obj:ConnectObj in connect_obj_dict.values():
		if connect_obj:
			connect_obj.disconnect_all()
	super.on_exit(args)
func get_view_state() -> GameEnum.ViewState:
	return super.get_view_state()
#endregion
#region 公共方法
#endregion
#region 私有方法
func _on_continue_btn_pressed():
	GameViewSystem.close_view(view_type)
func _on_setting_btn_pressed():
	## TODO 需要填入一下参数，使得可以自动打开设置相关
	GameViewSystem.open_view(GameEnum.ViewType.ComboView,{})
func _on_main_menu_btn_pressed():
	GameManager.back_to_main_menu()
#endregion
#region 生命周期函数
#endregion
